import request from '@/utils/request'


/** 分页查询角色数据
 * @param {Object} params
 */
export function getData(params){
  return request({
    url: 'api/admin/role/data',
    method: 'get',
    params
  })
}



// 获取所有的Role
export function getAll() {
  return request({
    url: 'api/admin/roles/all',
    method: 'get'
  })
}

export function save(data) {
  return request({
    url: 'api/admin/role/save',
    method: 'post',
    data
  })
}
 

export function get(id) {
  return request({
    url: 'api/admin/roles/' + id,
    method: 'get'
  })
}

export function getLevel() {
  return request({
    url: 'api/admin/roles/level',
    method: 'get'
  })
}

export function del(ids) {
  return request({
    url: 'api/admin/roles',
    method: 'delete',
    data: ids
  })
}

 

 
 